package com.bjf.commqry.method;

import com.bjf.exception.BJFException;
import com.bjf.util.ContextUtil;
import com.xjzp.business.db.hibernate.dao.TbRoleDAO;
import com.xjzp.business.db.hibernate.po.TbRole;

public class CQMethod {
	public static String test(String value) {
		return value + "1";
	}
	
	public static String getRoleName(String value) throws BJFException {
		TbRoleDAO dao = (TbRoleDAO)ContextUtil.getBean("TbRoleDAOTarget");
		TbRole role = dao.get(Integer.parseInt(value));
		if(role != null) {
			value = role.getRoleName();
		}
		return value;
	}
}
